package com.ccp.dev.qbdms.dao;

import com.ccp.dev.core.basic.base.IBaseMapper;
import com.ccp.dev.core.basic.web.query.QueryFilter;
import com.ccp.dev.qbdms.model.WQbdFalProblemreset;
import com.ccp.dev.qbdms.model.vo.SeriousFalProblemVo;
import com.ccp.dev.qbdms.model.vo.UnZeroProblemVo;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 质量问题管理 信息数据库操作类
 *
 * @author sun
 * @date 2020-05-06 15:57:36
 */
@Mapper
public interface WQbdFalProblemresetDao extends IBaseMapper<WQbdFalProblemreset, String> {

	List<WQbdFalProblemreset> queryAll(QueryFilter queryFilter);

	List<Map<String, Object>> queryAllES();

	@Select("select ID from w_qbd_fal_problemreset")
	List<String> queryAllID();

	List<WQbdFalProblemreset> getByIds(String[] lAryId);


	/**
	 * 根据id 关联 督办的id
	 */
	void associations(HashMap<String, Object> map);

	/**
	 * 流程审批页面查询通过的数据
	 */
	List<WQbdFalProblemreset> reportList(@Param("dataId") String dataId,
			@Param("tableName") String tableName);

	int confirmZero(Map<String, String> params);

	/**
	 * 2020-6-23 zzy 获取日期范围内的售后质量问题数据
	 */
	public Map<String, Object> getAfterSaleQualityBarDataByDate(Map<String, Object> querymap);

	/**
	 * 2020-6-24 zzy 获取售后质量问题数据,用作饼图
	 */
	public List<Map<String, Object>> getAfterSaleQualityPieDataByDate(Map<String, Object> querymap);

	/**
	 * 获取军贸质量统计图数据
	 *
	 * @param paramMap 参数
	 * @return List<Map < String, Object>>
	 */
	List<Map<String, Object>> getProblemResetHistogramDataByModelType(Map<String, Object> paramMap);


	/**
	 * 获取质量问题三年统计图数据
	 *
	 * @param paramMap 参数
	 * @return List<Map < String, Object>>
	 */
	List<Map<String, Object>> getQualityProblemData(Map<String, Object> paramMap);

	/**
	 * 获取批产型号按阶段统计
	 */
	public List<Map<String, Object>> getProduceChartDataByWorkPhase(Map<String, Object> querymap);

	/**
	 * 获取研制型号按工作阶段统计数据
	 */
	public List<Map<String, Object>> getModelDevChartDateByWorkPhase(Map<String, Object> querymap);

	/**
	 * 研制型号按原因统计
	 *
	 * @param paramMap 参数
	 * @return List<Map < String, Object>>
	 */
	List<Map<String, Object>> getProblemChartDateByWorkPhase(Map<String, Object> paramMap);

	/**
	 * 获取前五质量问题统计,院级统计厂所filldept字段
	 *
	 * @auth zzy
	 */
	public List<Map<String, Object>> getTop5ByFilldeptiid(Map<String, Object> querymap);

	/**
	 * 获取前五质量问题统计,集团统计院级FILLDEPTHOSPITALID字段
	 *
	 * @auth zzy
	 */
	public List<Map<String, Object>> getTop5ByFilldepthospitalid(Map<String, Object> querymap);

	List<UnZeroProblemVo> getUnZeroList(QueryFilter queryFilter);

	List<SeriousFalProblemVo> getSeriousList(QueryFilter queryFilter);

	WQbdFalProblemreset getParentAndChilden(String id);

	List<Map<String, Object>> getProblemChartDateByMonth(Map<String, Object> paramMap);

	List<Map<String, Object>> getProblemChartDateByDutyRoom(Map<String, Object> paramMap);
}
